package com.telit.common.vo.user;

import lombok.Data;

import java.io.Serializable;


/**
 * 统一平台返回的结构参数
 **/
@Data
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -120791499005484897L;
    private String code = "00000";
    private boolean success = true;
    private String errorMsg;
    private T data;

    public Result(String code, boolean success, String errorMsg, T data) {
        this.code = code;
        this.success = success;
        this.errorMsg = errorMsg;
        this.data = data;
    }

    public Result(String code, boolean success, String errorMsg) {
        this.code = code;
        this.success = success;
        this.errorMsg = errorMsg;
    }

    public Result(T data) {
        this.data = data;
    }

    public Result() {
    }
}
